package com.yytek.nmp.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 升级包对象 upgrade_firmware
 *
 * @author yytek-iot
 * @date 2022-09-06
 */
@ApiModel("升级包对象")
public class UpgradeFirmware extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")
    private Long id;

    /** 文件名 */
    @Excel(name = "文件名")
    @ApiModelProperty("文件名")
    private String fileName;

    /** 版本 */
    @Excel(name = "版本")
    @ApiModelProperty("版本")
    private String version;

    /** 文件大小(单位b) */
    @Excel(name = "文件大小(单位b)")
    @ApiModelProperty("文件大小(单位b)")
    private Long fileSize;

    /** 描述 */
    @Excel(name = "描述")
    @ApiModelProperty("描述")
    private String desc;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("上传时间")
    private Date uploadTime;

    /** 厂商 */
    @Excel(name = "厂商")
    @ApiModelProperty("厂商")
    private String manufacturer;

    /** 型号 */
    @Excel(name = "型号")
    @ApiModelProperty("型号")
    private String deviceModel;

    /** 绑定产品id */
    @Excel(name = "绑定产品id")
    @ApiModelProperty("绑定产品id")
    private Long productId;

    /** 产品名 */
    @Excel(name = "产品名")
    @ApiModelProperty("产品名")
    private String productName;

    /** 下载地址 */
    @Excel(name = "下载地址")
    @ApiModelProperty("下载地址")
    private String downloadUrl;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setFileName(String fileName)
    {
        this.fileName = fileName;
    }

    public String getFileName()
    {
        return fileName;
    }
    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getVersion()
    {
        return version;
    }
    public void setFileSize(Long fileSize)
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize()
    {
        return fileSize;
    }
    public void setDesc(String desc)
    {
        this.desc = desc;
    }

    public String getDesc()
    {
        return desc;
    }
    public void setUploadTime(Date uploadTime)
    {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime()
    {
        return uploadTime;
    }
    public void setManufacturer(String manufacturer)
    {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer()
    {
        return manufacturer;
    }
    public void setDeviceModel(String deviceModel)
    {
        this.deviceModel = deviceModel;
    }

    public String getDeviceModel()
    {
        return deviceModel;
    }
    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setDownloadUrl(String downloadUrl)
    {
        this.downloadUrl = downloadUrl;
    }

    public String getDownloadUrl()
    {
        return downloadUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("fileName", getFileName())
                .append("version", getVersion())
                .append("fileSize", getFileSize())
                .append("desc", getDesc())
                .append("uploadTime", getUploadTime())
                .append("manufacturer", getManufacturer())
                .append("deviceModel", getDeviceModel())
                .append("productId", getProductId())
                .append("productName", getProductName())
                .append("downloadUrl", getDownloadUrl())
                .toString();
    }
}
